import base64

a = '234567ABCDEFGHIJKLMNOPQRSTUVWXYZ'
b1 = f"GHI45FQRSCX****UVWJK67DELMNOPAB3"
a1 = ''
for i in a:
    if i not in b1:
        a1 += i
print(a1)
a = '2TYZ'

from itertools import permutations

str_list = ['T', 'Y', 'Z', '2']
# 生成所有的组合
perms = permutations(str_list)
middle_part = []
for perm in perms:
    print(perm)
    middle_part.append(''.join(perm))
print(middle_part)

flag = "TCMDIEOH2MJFBLKHT2J7BLYZ2WUE5NYR2HNG===="
for i in middle_part:
    b1 = f"GHI45FQRSCX{i}UVWJK67DELMNOPAB3="
    table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567='
    # print(b1)
    table = str.maketrans(b1, table)
    flag1 = base64.b32decode(flag.translate(table))
    print(flag1)
#rsa_and_base_all_right
c = "jWG0jdqJ7nbOlms0lhwGlPsTjTwGHQHNHTZ2jhl9HWE5lQYNlfyB"
string1 = "ZXChv/PxY+I6l17otb=nEsQcHjpuwrFKM0OTLzWfaA4kqiSUVG9myJ2d5ND8egR3B"
string2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
print(base64.b64decode(c.translate(str.maketrans(string1, string2))))
